package org.bronycorps.mlptss.domain.tweenable;

import org.bronycorps.mlptss.domain.actor.SpecialMissileActor;

import aurelienribon.tweenengine.TweenAccessor;

public class SpecialMissileAccessor implements
		TweenAccessor<SpecialMissileActor> {

	public static final int POSITION_XY = 1;

	@Override
	public int getValues(SpecialMissileActor target, int tweenType,
			float[] returnValues) {
		switch (tweenType) {
		case POSITION_XY:
			returnValues[0] = target.getModel().getPosition().x;
			returnValues[1] = target.getModel().getPosition().y;
			return 2;
		default:
			assert false;
			return -1;
		}
	}

	@Override
	public void setValues(SpecialMissileActor target, int tweenType,
			float[] newValues) {
		switch (tweenType) {
		case POSITION_XY:
			target.getModel().setPosition(newValues[0], newValues[1]);
			break;
		default:
			assert false;
			break;
		}
	}

}
